﻿<Selection:SelectControl x:Class="jSLApp.Client.Forms.UserList"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:Selection="clr-namespace:jSLCore.Client.Presentation.BaseControl.Selection;assembly=jSLCore.Client.Presentation" xmlns:j="clr-namespace:jSLCore.Client.Presentation.Controls;assembly=jSLCore.Client.Presentation" xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" xmlns:jBinding="clr-namespace:jSLCore.Client.Presentation.jBinding;assembly=jSLCore.Client.Presentation" mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" Title="Пользователи" Icon="../Resources/Users.png" AcceptButtonName="searchButton">
    <j:ImageGroupBox ImageSource="../resources/search.png">
        <j:ImageGroupBox.Header>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Поиск:" VerticalAlignment="Center"/>
                <TextBox Width="150" x:Name="txt">                    
                </TextBox>
                <CheckBox Name="showAll" Content="Показывать скрытых"/>
                <Button Content="Обновить" Name="searchButton"/>
            </StackPanel>
        </j:ImageGroupBox.Header>
        <Selection:jSLGrid x:Name="grid" IsShowDetailsButtonVisible="True" ShowDetailsClicked="gotoDetailed_Clicked" HeadersVisibility="Column">
            <Selection:jSLGrid.Columns>
                <Controls:DataGridTextColumn Header="Логин" Binding="{Binding Login}"/>
                <Controls:DataGridTextColumn Header="E-Mail" Binding="{Binding email}"/>
                <Controls:DataGridTextColumn Header="Роль" Binding="{Binding RoleText}"/>
                <Controls:DataGridCheckBoxColumn Header="Блокировка">
                	<Controls:DataGridCheckBoxColumn.Binding>
                		<jBinding:jBinding Path="IsEnabled" ConvertingMode="InvertBoolean"/>
                	</Controls:DataGridCheckBoxColumn.Binding>
                </Controls:DataGridCheckBoxColumn>
                <Controls:DataGridTextColumn Header="Визит">
                    <Controls:DataGridTextColumn.Binding>
                        <jBinding:jBinding Path="LastVisit" ConvertingMode="ToShortDateAndTime"/>
                    </Controls:DataGridTextColumn.Binding>
                </Controls:DataGridTextColumn>
                <Controls:DataGridTextColumn Header="Регистрация">
                    <Controls:DataGridTextColumn.Binding>
                        <jBinding:jBinding Path="CreationDate" ConvertingMode="ToShortDate"/>
                    </Controls:DataGridTextColumn.Binding>
                </Controls:DataGridTextColumn>
            </Selection:jSLGrid.Columns>
        </Selection:jSLGrid>
    </j:ImageGroupBox>
</Selection:SelectControl>
